{% extends "schedule/base.html" %}
{% block body %}
    <a href={{calendar.add_event_url}}>Add event</a>
    <h1>
        <a href="{% url s_calendar_date calendar.id,month.prev_month.year,month.prev_month.month %}"> &lt; </a>
        {{month.name}} {{month.year}}
        <a href="{% url s_calendar_date calendar.id,month.next_month.year,month.next_month.month %}"> &gt; </a></h1>
    <table style="border: black solid 1px">
    {% for week in month.get_weeks %}
        <tr>
        {% for day in week.get_days %}
             <td style="border: black solid 1px;
                        min-width: 125px;
                        width: 125px;
                        height: 125px;
                        min-height: 125px;
                        vertical-align: top;
                        padding-left: 10px
                        ">
                 <h2>{{day.start.day}}</h2>
                 <ul>
                    {% for occurrence_partial in day.get_occurrence_partials %}
                        <li>{{ occurrence_partial.occurrence.start.time }} - {{ occurrence_partial.occurrence.end.time }} : <a href="{{occurrence_partial.occurrence.event.get_absolute_url}}">
                            {{ occurrence_partial.occurrence.event.title }}</a>
                                {% ifequal occurrence_partial.class 0 %}(Starts){% endifequal %}
                                {% ifequal occurrence_partial.class 2 %}(Continues){% endifequal %}
                                {% ifequal occurrence_partial.class 3 %}(Ends){% endifequal %}
                        </li>
                    {% endfor %}
                </ul>
             </td>
        {% endfor %}
        </tr>
    {% endfor %}
    </table>
{% endblock %}
